Reconnect WebSockets when configuration settings change#705
Conversation
a60e95a to
ee02756
Compare
WebSockets now automatically reconnect when relevant settings change (proxy, TLS, header command, etc.). Previously, only credential changes (host, and token) triggered reconnection.
ee02756 to
31625da
Compare
code-asher
left a comment
There was a problem hiding this comment.
Broadly looks good to me. I do wonder though, if we have a working web socket connection do we really need to reconnect? Could make sense for the proxy settings, if you want to switch to a new proxy or something. For the rest though seems like if we have a working web socket, might as well keep using it.
|
Ah but maybe the "reconnect" wording is throwing me off, if the web socket is currently failing to connect, makes sense to force a retry once the settings have changed. But does seem like if the web socket is working we could leave it. Probably not worth the effort though, the settings probably change infrequently. |
My thoughts as well, we could in theory just do |
Summary
watchConfigurationChangesutility fromremote.tsSettings that trigger reconnection
coder.headerCommandcoder.insecurecoder.tlsCertFile,coder.tlsKeyFile,coder.tlsCaFile,coder.tlsAltHosthttp.proxy,coder.proxyBypassCloses #691